#pragma once

#include "base/core/singleton.h"
#include "base/core/object_pool.h"
#include "Scene/SceneMgr.h"
#include "Common/ComDefine.pb.h"
#include "Common/DuplicateDefine.h"
#include "BrushCommon.h"
#include "BrushTower.h"
#include "BrushGuard.h"
#include "BrushEmpty.h"
#include "BrushUnion.h"
#include "BrushGuide.h"



//刷怪管理
class BrushMonsMgr : public ManualSingleton<BrushMonsMgr>
{
	friend class ManualSingleton < BrushMonsMgr >;
public:
	BrushMonsMgr();
	~BrushMonsMgr();
	bool Init();
	void UnInit();
	IBrushMonster *MakeBrushObj(int8_t byBrushType);
	void FreeBrushObj(IBrushMonster *pBrushObj);
	void RecycleBrush(IBrushMonster *pBrushObj);
private:
	ObjectPool<BrushCommon> *m_pCommonPool;
	ObjectPool<BrushTower> *m_pTowerPool;
	ObjectPool<BrushGuard> *m_pGuardPool;
	ObjectPool<BrushEmpty> *m_pEmptyPool;
	ObjectPool<BrushUnion> *m_pUnionPool;
	ObjectPool<BrushGuide> *m_pGuidePool;	
	
};


#define g_MakeBrushMonsMgr() (BrushMonsMgr::Instance())
#define g_GetBrushMonsMgr()  (BrushMonsMgr::GetInstance())
#define g_DelBrushMonsMgr()  (BrushMonsMgr::Destroy())